package com.maimao.goods;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;

/**
 * @author MaoLin Wang
 * @date 2020/12/8 4:37 下午
 */

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class})//去掉自动配置，让Seata自动配置代理数据源
@ComponentScan(basePackages = {"com.maimao.core"})
@ComponentScan(basePackages = {"com.maimao.api"})
@ComponentScan(basePackages = {"com.maimao.mg"})
@ComponentScan(basePackages = {"com.maimao.goods"})
@ComponentScan(basePackages = {"com.maimao.redis"})
@ComponentScan(basePackages = {"com.maimao.message.kafka"})
@ComponentScan(basePackages = {"com.maimao.websocket"})
@ComponentScan(basePackages = {"com.maimao.email"})
@MapperScan(basePackages = {"com.maimao.goods.mapper"})
@EnableMongoRepositories(basePackages = "com.maimao.mg.repository")
@EnableDiscoveryClient
@EnableFeignClients
@EnableAspectJAutoProxy
@RefreshScope
public class GoodsApplication {
    public static void main(String[] args) {
        SpringApplication.run(GoodsApplication.class, args);
    }
}
